Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move evolution strategy bounds to init #436

Merged
merged 9 commits into from
Dec 9, 2023
Merged

Move evolution strategy bounds to init #436

merged 9 commits into from
Dec 9, 2023

Conversation

btjanaka
Copy link
Member

@btjanaka btjanaka commented Dec 9, 2023

Description

Previously, bounds were passed in to the ES's in the ask method. However, we never use dynamic bounds, so it makes more sense to simply pass in the bounds in the init, as is done in the emitters.

Also made some other small changes to clean up the ESs (see TODO list below).

While moving the bounds around is a backwards-incompatible change, I do not anticipate this will affect many people since the evolution strategies are mostly internal classes that are called by the emitters.

TODO

  • Add lower_bounds and upper_bounds to EvolutionStrategyBase.__init__
  • Remove lower_bounds and upper_bounds from EvolutionStrategyBase.ask()
  • Add batch_size=None to EvolutionStrategyBase.ask() (currently, all ES's do this but it was not reflected in the base class).
  • Update other ES's to match EvolutionStrategyBase
  • Remove unnecessary calls to threadpool_limits in sep-CMA-ES, LM-MA-ES, and OpenAI-ES -- threadpool_limits was only intended to help with eigendecompositions, and these classes do not use eigendecompositions
  • Fix calls in emitters
  • Add better tests for emitters

Questions

Status

  • I have read the guidelines in
    CONTRIBUTING.md
  • I have formatted my code using yapf
  • I have tested my code by running pytest
  • I have linted my code with pylint
  • I have added a one-line description of my change to the changelog in
    HISTORY.md
  • This PR is ready to go

@btjanaka btjanaka merged commit 6431b27 into master Dec 9, 2023
17 checks passed
@btjanaka btjanaka deleted the es-bounds branch December 9, 2023 01:04
btjanaka added a commit that referenced this pull request Dec 9, 2023
## Description

<!-- Provide a brief description of the PR's purpose here. -->

This PR adds the `ranking_values` argument to the tell() method in
evolution strategies. This paves the way for #434, since pycma needs the
ranking values to be passed into tell().

Note that I considered removing ranking_values from `check_stop` and
instead forcing the ES to store its own ranking values like pycma does,
but I do not think this is a necessary change.

This change is backwards-incompatible, but similar to #436, I do not
think it will affect most users.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

- [x] Update EvolutionStrategyBase and corresponding ESs
- [x] Update emitter calls
- [x] Remove redundant method docstrings

## Questions

<!-- Any concerns or points of confusion? -->

## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] I have added a one-line description of my change to the changelog
in
      `HISTORY.md`
- [x] This PR is ready to go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant